﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Common.DLR
{
    /// <summary>
    /// table references
    /// </summary>
    [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)]
    public class OrmForeignKey : Attribute
    {
        private Type _ParentType;
        /// <summary></summary>
        public Type ParentType
        {
            get
            {
                return this._ParentType;
            }
            set
            {
                this._ParentType = value;
            }
        }

        private string _ParentMemberName;
        /// <summary></summary>
        public string ParentMemberName
        {
            get
            {
                return this._ParentMemberName;
            }
            set
            {
                this._ParentMemberName = value;
            }
        }

        /// <summary>
        /// ctor
        /// </summary>
        /// <param name="pType"></param>
        /// <param name="pMemberName"></param>
        public OrmForeignKey(Type pType, string pMemberName)
        {
            this._ParentType = pType;
            this._ParentMemberName = pMemberName;
        }
    }
}
